const path = require("path");

module.exports = {
  mode: "none",
  entry: "./index.js",
  output: {
    path: path.resolve(__dirname, "dist"), //绝对路径
    filename: "index.bundle.js",
    // publicPath: "dist/",
  },
  module: {
    rules: [
      {
        test: /\/js$/,
        exclude: /node_modules/,
        loader: "babel-loader",
        options: {
          // 预设：指示babel做怎么样的兼容性处理
          presets: [["@babel/preset-env"]],
        },
      },
    ],
  },
};
